home *** CD-ROM | disk | FTP | other *** search
- /* $Id: $ */
- /**********************************************************************/
- /*
- * Final Copy II Arexx Macro - OpenFonts
- *
- * Opens all fonts from several directories
- * (see path definitions and patterns below)
- *
- * Requires: Final Copy II
- * Author: Stefan Winterstein (winter@cs.uni-sb.de)
- * Status: Public Domain
- *
- */
- /**********************************************************************/
- /*
- * Here you can specify which fonts in which directories will be opened.
- * Remember to adjust 'path.0' to the number of paths.
- */
- path.1 = "CGFonts:~(#?bold#?|#?italic#?|#?fett#?|#?kursiv#?)#?.font"
- path.2 = "SWOLFonts:~(#?bold#?|#?italic#?)" /* no Bold/Italic fonts */
- path.3 = "SWOLFonts:Deco/#?"
- path.4 = "SWOLFonts:Sans/~(#?bold#?|#?italic#?)" /* no Bold/Italic fonts */
- path.5 = "SWOLFonts:Serif/~(#?bold#?|#?italic#?)" /* no Bold/Italic fonts */
- path.0 = 5 /* number of directories */
- /**********************************************************************/
- OPTIONS RESULTS
- /*
- * Create a sorted file containg all fonts we want to open
- */
- fontfiles = ""
- DO i=1 FOR path.0
- ADDRESS COMMAND 'List >ram:fontlist.error "'||path.i||'" FILES LFORMAT=%p%n TO RAM:fontlist.'||i
- fontfiles = fontfiles "RAM:fontlist."||i
- END i
- ADDRESS COMMAND 'Join' fontfiles 'TO RAM:fontlist.unsorted'
- ADDRESS COMMAND 'Sort RAM:fontlist.unsorted TO RAM:fontlist'
-
- /**********************************************************************/
- /*
- * Read fontlist file into variable 'fontlist.'
- */
- i = 0
- IF OPEN(.infile, "RAM:fontlist", "R") THEN DO
- DO UNTIL EOF(.infile)
- i = i +1
- fontlist.i = READLN(.infile)
- END
- CALL CLOSE(.infile)
- END
- fontlist.0 = i-1
-
- /* ADDRESS COMMAND 'Delete RAM:fontlist#?' */
-
- /**********************************************************************/
- /*
- * Open all fonts from 'fontlist.' in FinalCopy
- */
- 'Status FontName'
- oldfont = RESULT
-
- DO i=1 FOR fontlist.0
- 'Font' fontlist.i
- END i
-
- 'Font' oldfont /* reset old font */
-
- /**********************************************************************/
- EXIT
-